Skip to content

gh-156226: Fix doubled-word typos in the difflib documetation - #156227

Merged
StanFromIreland merged 5 commits into
python:mainfrom
zaveshaa:fix/doubled-word-typos
Aug 23, 2026
Merged

gh-156226: Fix doubled-word typos in the difflib documetation#156227
StanFromIreland merged 5 commits into
python:mainfrom
zaveshaa:fix/doubled-word-typos

Conversation

@zaveshaa

@zaveshaa zaveshaa commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #156226

Four doubled-word typos found with a regex scan, all verified in context:

File Before → After
Doc/library/difflib.rst produced in in various → produced in various
Lib/multiprocessing/resource_tracker.py we encode encode the raw name bytes → we encode the raw
Lib/test/test_exception_group.py Is is also used below → It is also used below
Lib/test/test_unittest/testmock/testhelpers.py isn't isn't callable → isn't callable

Comments-only changes plus one prose line in docs; no behavior change. Touched .py files still compile.

- Doc/library/difflib.rst: 'produced in in various formats'
- Lib/multiprocessing/resource_tracker.py: 'we encode encode the raw name bytes'
- Lib/test/test_exception_group.py: 'Is is also used' -> 'It is also used'
- Lib/test/test_unittest/testmock/testhelpers.py: 'isn't isn't callable'
@python-cla-bot

python-cla-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Aug 22, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@read-the-docs-community

read-the-docs-community Bot commented Aug 22, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34186576 | 📁 Comparing d7e0baf against main (f74cdf8)

  🔍 Preview build  

1 file changed
± library/difflib.html

@aisk aisk added the skip news label Aug 22, 2026

@BHUVANSH855 BHUVANSH855 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLA test is failing, kindly sign the CLA so that maintainers can start with review process.

Comment thread Lib/multiprocessing/resource_tracker.py Outdated
Comment thread Lib/test/test_exception_group.py Outdated
Comment thread Lib/test/test_unittest/testmock/testhelpers.py Outdated

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only difflib.rst should be modified because other comments are internal and not visible through help(). We don't make those changes because it's considered code churn.

Comments in internal code are not visible through help() and changing
them is considered code churn (review by picnixz).
@zaveshaa

Copy link
Copy Markdown
Contributor Author

Reverted the three .py comment changes — only the Doc/library/difflib.rst fix remains. Thanks for the review!

Also checking on the CLA status now.

@picnixz

picnixz commented Aug 22, 2026

Copy link
Copy Markdown
Member

You don't need a NEWS entry as it's a doc only changes

Comment thread Doc/library/difflib.rst
@zaveshaa

Copy link
Copy Markdown
Contributor Author

Re-scanned the whole file with a doubled-word + common-misspellings checker (code blocks excluded): found and fixed one more — doubled to in "argument to to False" (line 55). The remaining doubled-word hits are inside doctest code (" abcd", "abcd abcd") and are intentional.

@picnixz — the two test-comment reverts you asked for were already included in my earlier "Apply review feedback" commit; your review likely crossed paths with that push. Also noticed the NEWS entry was removed from the branch — understood, thanks!

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for checking!

@StanFromIreland StanFromIreland changed the title gh-156226: Fix doubled-word typos in docs and comments gh-156226: Fix doubled-word typos in the difflib documetation Aug 22, 2026
@picnixz

picnixz commented Aug 22, 2026

Copy link
Copy Markdown
Member

Do difflib.py needs to be updated as well? (we can swipe it as well)

@zaveshaa

Copy link
Copy Markdown
Contributor Author

Checked Lib/difflib.py as well:

  • No doubled words in prose, comments, or docstrings.
  • The codespell-style hits there are all intentional:
    • alo, ahi, blo, bhi — core SequenceMatcher/get_grouped_opcodes variable names;
    • aline, bline — parameter names of _qformat();
    • ore occurrences are inside doctest diff output (e.g. + ore lines), not prose.

So difflib.py itself looks clean to me — nothing to swipe unless you've spotted a specific spot.

@StanFromIreland
StanFromIreland merged commit e7468d1 into python:main Aug 23, 2026
34 checks passed
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks for checking.

@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 23, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @zaveshaa for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @zaveshaa for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @zaveshaa for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 23, 2026

Copy link
Copy Markdown

GH-156295 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 23, 2026
@bedevere-app

bedevere-app Bot commented Aug 23, 2026

Copy link
Copy Markdown

GH-156296 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 23, 2026
@bedevere-app

bedevere-app Bot commented Aug 23, 2026

Copy link
Copy Markdown

GH-156297 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix doubled-word typos in docs and comments

5 participants